package vn.vietel.pms.entity;

import java.io.Serializable;
import java.util.Date;

import static org.jboss.seam.ScopeType.EVENT;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

@Entity
@Name("vhistoryofproperty")
@Scope(EVENT)
@Table(name = "VHistoryOfProperty")
public class VHistoryOfProperty implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6677010297711201342L;

	private Long id;
	private java.util.Date changeDate;
	private VBTSStation changeByStation;
	private VPropertyDetails detailsProperty;
	private VHistoricalAction historicalAction;

	public VHistoryOfProperty() {
		super();
	}

	public VHistoryOfProperty(Long id, Date changeDate,
			VBTSStation changeByStation, VPropertyDetails detailsProperty,
			VHistoricalAction historicalAction) {
		super();
		this.id = id;
		this.changeDate = changeDate;
		this.changeByStation = changeByStation;
		this.detailsProperty = detailsProperty;
		this.historicalAction = historicalAction;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "historyId")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public java.util.Date getChangeDate() {
		return changeDate;
	}

	public void setChangeDate(java.util.Date changeDate) {
		this.changeDate = changeDate;
	}

	@ManyToOne()
	@JoinColumn(name = "stationId")
	public VBTSStation getChangeByStation() {
		return changeByStation;
	}

	public void setChangeByStation(VBTSStation changeByStation) {
		this.changeByStation = changeByStation;
	}

	@ManyToOne()
	@JoinColumn(name = "detailsId")
	public VPropertyDetails getDetailsProperty() {
		return detailsProperty;
	}

	public void setDetailsProperty(VPropertyDetails detailsProperty) {
		this.detailsProperty = detailsProperty;
	}

	@ManyToOne()
	@JoinColumn(name = "historicalId")
	public VHistoricalAction getHistoricalAction() {
		return historicalAction;
	}

	public void setHistoricalAction(VHistoricalAction historicalAction) {
		this.historicalAction = historicalAction;
	}

}
